# encoding: utf-8

=begin
常用的工具方法
=end
module Utils

	#检查邮件地址是否合法
	def self.match_email?(email)
		return false if email.blank?
		
		email =~ /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
	end
end

ActiveRecord::Base.send(:include, Utils)
ActionController::Base.send(:include, Utils)
